{extend name="base" /}
{block name="js"}
<script src="__STATIC__/plugins/echarts/echarts.min.js?v={$v}" type="text/javascript"></script>
<script src="__ADMIN__/reports/stat_orders.js?v={$v}" type="text/javascript"></script>
{/block}
{block name="main"}
<style>
#mainTable{width:95%;text-align:center;border:1px solid #eee;margin: 0px auto;margin-bottom:40px;font-size:13px;}
.wst-list .num{text-align:center;}
.wst-list tr th{background:#f5f5f5;border-bottom:1px solid #eee;font-weight: normal;}
.wst-list tr td,.wst-list tr th {height: 35px;line-height: 35px;text-align:center}
.wst-list tr td{border-bottom:1px dotted #eee;}
.wst-list tbody tr:hover{background:#f5f5f5;}
</style>
<div class="wst-toolbar">
<input type="text" id="startDate" name="startDate" class="laydate-icon ipt" maxLength="20" value='{$startDate}' placeholder='开始日期'/>
至
<input type="text" id="endDate" name="endDate" class="laydate-icon ipt" maxLength="20" value='{$endDate}' placeholder='结束日期'/>
支付方式:
<select id='payType' class='ipt'>
	<option value='-1'>全部</option>
	<option value='0'>货到付款</option>
	<option value='1'>在线支付</option>
</select>
<button class="btn btn-primary" onclick='javascript:loadStat()'><i class='fa fa-search'></i>查询</button>  
<button class="btn btn-primary f-right" style='margin-top:0px;' onclick='javascript:toExport(0)'><i class="fa fa-sign-in"></i>导出</button>  
</div>
<div class="wst-tips-box">
    <div class="icon"></div>
    <div class="tips">该统计不含未支付的订单</div>
    <div style="clear:both"></div>
</div>
<div id="main" style='width:95%;height:400px;margin: 0px auto'></div>
<table id='mainTable' class='wst-list'>
        <thead>
            <tr>
              <th width='20'>&nbsp;&nbsp;</th>
              <th width='100'>日期</th>
              <th width='100'>电脑端(单)</th>
              <th width='130'>触屏端(单)</th>
              <th width='130'>微信端(单)</th>
              <th width='130'>小程序(单)</th>
              <th width='130'>安卓端(单)</th>
              <th width='130'>苹果端(单)</th>
              <th width='130'>总订单(单)</th>
            </tr>
        </thead>
        <tbody id='list-box'></tbody>
        <script id="stat-tblist" type="text/html">
        {{# for(var i = 0; i < d['days'].length; i++){ }}
            <tr>
              <td class='num'>{{(i+1)}}</td>
              <td>{{ d['days'][i]}}</td>
              <td>{{ WST.blank(d['p0'][i],'0')}}</td>
              <td>{{ WST.blank(d['p2'][i],'0')}}</td>
              <td>{{ WST.blank(d['p1'][i],'0')}}</td>
              <td>{{ WST.blank(d['p5'][i],'0')}}</td>
              <td>{{ WST.blank(d['p3'][i],'0')}}</td>
              <td>{{ WST.blank(d['p4'][i],'0')}}</td>
              <td>{{ WST.blank(d['total'][i],'0')}}</td>
            </tr>
        {{# } }}
        </script>
</table>
{/block}